package com.assistant.action;

import org.utils.ActionUtils;
import org.utils.Page;

import com.assistant.model.Message;
import com.assistant.service.MessageService;

public class MessageAction extends ActionUtils {
	private static final long serialVersionUID = 1L;

	private Message message;
	private Page page;

	private MessageService messageService;

	public String message(){
		//message = messageService.queryById(message.getId());
		return SUCCESS;
	}
	
	public String loanList(){
		if(message==null){
			message = new Message();
		}
		if(page==null){
			page = new Page();
			page.setCurrentPage(1);
			page.setPageSize(10);
		}
		page = messageService.queryPage(message, page);
		return SUCCESS;
	}
	
	public String toAddLoan(){
		return SUCCESS;
	}
	
	public String addLoan(){
		System.out.println("jinrufangfa");
		return SUCCESS;
	}
	
	public Message getLoan() {
		return message;
	}

	public void setLoan(Message message) {
		this.message = message;
	}

	public Page getPage() {
		return page;
	}

	public void setPage(Page page) {
		this.page = page;
	}

	public MessageService getLoanService() {
		return messageService;
	}

	public void setLoanService(MessageService messageService) {
		this.messageService = messageService;
	}

}
